/**
 * Copyright ©2016-2020 northkingbpo Corporation, All Rights Reserved
 * http://www.northkingbpo.net/
 */
package profile.hujia.springcloudhystrix.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import profile.hujia.springcloudhystrix.remote.CallRemoteService;

/**
 * class info
 *
 * @author hujia
 * @date 2018/12/12 09:21
 */
@RestController
@RequestMapping("/test")
public class HystrixController {

    private final CallRemoteService remoteService;

    public HystrixController(CallRemoteService service) {
        this.remoteService = service;
    }

    @GetMapping("/call")
    public String call() throws Exception {
        return remoteService.getRemoteService();
    }
}
